<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>修改员工</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<script type="text/javascript" src="H-ui.admin/lib/html5shiv.js"></script>
<script type="text/javascript" src="H-ui.admin/lib/respond.min.js"></script>
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui/css/H-ui.min.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/css/H-ui.admin.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/lib/Hui-iconfont/1.0.8/iconfont.css" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/skin/default/skin.css" id="skin" />
<link rel="stylesheet" type="text/css"
	href="H-ui.admin/static/h-ui.admin/css/style.css" />
<script type="text/javascript"
	src="H-ui.admin/lib/DD_belatedPNG_0.0.8a-min.js"></script>
<script>
	DD_belatedPNG.fix('*');
</script>
</head>

<body>
	<article class="page-container"> <nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span>
	员工管理 <span class="c-gray en">&gt;</span> 修改员工 <a
		class="btn btn-success radius r"
		style="line-height:1.6em;margin-top:3px"
		href="javascript:location.replace(location.href);" title="刷新"><i
		class="Hui-iconfont">&#xe68f;</i> </a></nav>
	<form action="empActionupdateEmp" method="post"
		class="form form-horizontal" id="form-admin-add">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>员工姓名：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.name" />" placeholder="" id="name"
					name="sywEmp.name">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="namemag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>性别：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<span class="select-box" style="width:150px;"> <s:select
						id="gender" Class="select" name="sywEmp.gender" list="{'男','女'}"
						headerKey="0" headerValue="请选择" theme="simple"
						value="sywEmp.gender">
					</s:select>
				</span>
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="gendermag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>年龄：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.age" />" placeholder="" id="age"
					name="sywEmp.age">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="agemag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>身份证：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.card" />" placeholder="" id="card"
					name="sywEmp.card">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="cardmag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>手机号：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.telphone" />" placeholder=""
					id="telphone" name="sywEmp.telphone">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="telphonemag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>地址：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.address" />" placeholder=""
					id="address" name="sywEmp.address">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="addressmag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>工资：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.salary" />" placeholder=""
					id="salary" name="sywEmp.salary">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="salarymag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>实际工资：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<input type="text" class="input-text"
					value="<s:property value="sywEmp.realsalary" />" placeholder=""
					id="realsalary" name="sywEmp.realsalary">
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="realsalarymag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>员工状态：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<s:select Class="select" name="sywEmp.estate"
					list="{'在职','离职','休息'}" value="sywEmp.estate" headerKey="0"
					headerValue="请选择" theme="simple">
				</s:select>
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="estatemag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>职位：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<span class="select-box" style="width:150px;"><s:action
						name="empActionfindPotision" id="po" /> <s:select id="p" Class="select"
						list="poList" headerKey="0" headerValue="请选择"
						listValue="name"
						name="sywEmp.sywPotision.id"
						listKey="id"
						value="%{sywEmp.sywPotision.id}">
					</s:select> <%-- <select id="p"
					class="select" name="sywEmp.sywPotision.id" size="1">
						<option value="0">请选择</option>
						<s:iterator value="poList" id="p">
							<option value="<s:property value="#p.id" />">
								<s:property value="#p.name" />
							</option>
						</s:iterator>
				</select> --%> </span>
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="potisionmag"></div>
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-1"><span
				class="c-red">*</span>部门：</label>
			<div class="formControls col-xs-8 col-sm-3">
				<span class="select-box" style="width:150px;"><s:action
						name="empActionfindDept" id="de" /> <s:select id="d" Class="select"
						list="deptList" headerKey="0" headerValue="请选择"
						listValue="name"
						name="sywEmp.sywDept.id"
						listKey="id"
						value="%{sywEmp.sywDept.id}">
					</s:select><%-- <select id="d" class="select"
					name="sywEmp.sywDept.id" size="1">
						<option value="0">请选择</option>
						<s:iterator value="deptList" id="t">
							<option value="<s:property value="#t.id" />">
								<s:property value="#t.name" />
							</option>
						</s:iterator>
				</select> --%> </span>
				<div class="formControls col-xs-8 col-xs-offset-3"
					style="color: red;" id="deptmag"></div>
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-1">
				<input class="btn btn-primary radius" type="submit"
					value="&nbsp;&nbsp;提交&nbsp;&nbsp;">
			</div>
		</div>
	</form>
	</article>
	<!--_footer 作为公共模版分离出去-->
	<script type="text/javascript"
		src="H-ui.admin/lib/jquery/1.9.1/jquery.min.js"></script>
	<script type="text/javascript" src="H-ui.admin/lib/layer/2.4/layer.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/static/h-ui/js/H-ui.min.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/static/h-ui.admin/js/H-ui.admin.js"></script>
	<!--/_footer 作为公共模版分离出去-->

	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript"
		src="H-ui.admin/lib/jquery.validation/1.14.0/jquery.validate.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/jquery.validation/1.14.0/validate-methods.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/jquery.validation/1.14.0/messages_zh.js"></script>
	<!--请在下方写此页面业务相关的脚本-->
	<script type="text/javascript"
		src="H-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
	<script type="text/javascript"
		src="H-ui.admin/lib/laypage/1.2/laypage.js"></script>
	<script type="text/javascript">
		$(function() {
			$('.skin-minimal input').iCheck({
				checkboxClass : 'icheckbox-blue',
				radioClass : 'iradio-blue',
				increaseArea : '20%'
			});
			$("#name").blur(function() {
				var name = $("#name").val();
				if (name == "") {
					$("#namemag").html("员工姓名不能为空");
				} else {
					$("#namemag").html("");
				}
			});
			$("#gender").blur(function() {
				var gender = $("#gender").val();
				if (gender == "") {
					$("#gendermag").html("性别不能为空");
					return false;
				} else if (gender == 1) {
					$("#gender").val() == "男";
					return true;
				} else {
					$("#gender").val() == "女";
				}
			});
			$("#age").blur(function() {
				var age = $("#age").val();
				if (age == "") {
					$("#agemag").html("年龄不能为空");
				} else {
					$("#agemag").html("");
				}
			});
			$("#card").blur(function() {
				var card = $("#card").val();
				if (card == "") {
					$("#cardmag").html("身份证不能为空");
				} else {
					$("#cardmag").html("");
				}
			});
			$("#telphone").blur(function() {
				var telphone = $("#telphone").val();
				if (telphone == "") {
					$("#telphonemag").html("手机号不能为空");
				} else {
					$("#telphonemag").html("");
				}
			});
			$("#address").blur(function() {
				var address = $("#address").val();
				if (address == "") {
					$("#addressmag").html("地址不能为空");
				} else {
					$("#addressmag").html("");
				}
			});
			$("#salary").blur(function() {
				var salary = $("#salary").val();
				if (salary == "") {
					$("#salarymag").html("工资不能为空");
				} else {
					$("#salarymag").html("");
				}
			});
			$("#realsalary").blur(function() {
				var realsalary = $("#realsalary").val();
				if (realsalary == "") {
					$("#realsalarymag").html("实际工资不能为空");
				} else {
					$("#realsalarymag").html("");
				}
			});
			$("#estate").blur(function() {
				var estate = $("#estate").val();
				if (estate == 0) {
					$("#estatemag").html("请至少选择一个员工状态");
				} else {
					$("#estatemag").html("");
				}
			});
			$("#d").blur(function() {
				var d = $("#d").val();
				if (d == 0) {
					$("#deptmag").html("请至少选择一个部门");
				} else {
					$("#deptmag").html("");
				}
			});
			$("#p").blur(function() {
				var p = $("#p").val();
				if (p == 0) {
					$("#potisionmag").html("请至少选择一个职位");
				} else {
					$("#potisionmag").html("");
				}
			});
			$("#realsalary").blur(function() {
				var realsalary = $("#realsalary").val();
				if (realsalary == "") {
					$("#realsalarymag").html("实际工资不能为空");
				} else {
					$("#realsalarymag").html("");
				}
			});
		});
	</script>
</body>
</html>
